<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="../common/taglib.jsp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html>
<html>
  <head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>我的首页</title>
	<meta http-equiv="X-UA-Compatible" content="IE=11; IE=10; IE=9; IE=8; IE=7; IE=EDGE">
	
	<link rel="stylesheet" type="text/css" href="<c:url value="/css/header.css"/>">
	<link rel="stylesheet" type="text/css" href="<c:url value="/css/common.css"/>">
	<link rel="stylesheet" type="text/css" href="<c:url value="/css/public.css"/>">
	<link rel="stylesheet" type="text/css" href="<c:url value="/css/default.css"/>">
	<link rel="stylesheet" type="text/css" href="<c:url value="/css/footer.css"/>">
	<script type="text/javascript" src="<c:url value="/js/jquery.min.js"/>"></script>
	<script type="text/javascript">
		function hotterUp(){
			$.ajax({
				url:'<c:url value="/job/hotter"/>',
				cache:false,
				type:"POST",
				data:{'id':'${job.id}'},
				dataType:'json',
				success:function(){}
			});
		}
	</script>
	
  </head>
<body id="home" onload="hotterUp()">

<jsp:include page="../common/header.jsp"></jsp:include>

<div class="wrap clearfix">
  <div class="main"> 
	   <div class="feeds-panel">
	   		<div class="title">
		        <div class="title-info ">
		          <p align="right">浏览数:${job.hot+1}</p>
		          <h1 title="${job.position }" >${job.position }</h1>
		          <h3>${job.company.fullName }</h3>	          
		          <span class="title-triangle"></span>
		        </div>			
		        <div class="job-main ">
		        	<div class="clearfix">
		        		<div class="job-title-left">
				          <h4 style="color:orange">${job.salary }万</h4>
				          <div class="resume clearfix">
				            <span>${job.workplace }</span>
				            <span>${job.education }</span>
				           	<span>${job.experience }以上</span>
				          </div>
				          <p class="release-time">发布时间：<em>${job.publishTime }</em></p>
				        </div>
				      </div>	        			
		         </div>
		        <!-- 信息 -->
		        <div class="job-main main-message ">
		          <h3>基本信息：</h3>
		          <div class="content">
		            <ul>
					 <li>
					 	工作地点： ${job.workplace }
	            	</li>		             
		            </ul>
		          </div>
		        </div>
		        <!-- 职位描述 -->
		        <div class="job-main main-message ">
		          <h3>职位描述：</h3>
		          <div class="content content-word">
		          	${job.description }
		          </div>
		        </div>				 
		         <!-- 职位要求 -->
		        <div class="job-main main-message ">
		          <h3>岗位要求：</h3>
		          <div class="content">
		            <ul>
		              <li><span>学历要求：</span>${job.education }</li>
		              <li><span>性别要求：</span>不限</li>
		              <li><span>语言要求：</span>普通话</li>
		              <li><span>专业要求：</span>${job.major }</li>
		              <li><span>工作年限：</span>${job.experience }以上</li>
		            </ul>
		          </div>
		        <!-- 企业介绍 -->
		        <div class="job-main main-message noborder " >
		          <h3>企业介绍：</h3>
		          <div class="content content-word">
		          		${job.company.description }
		             <br><br>公司网站：${job.company.homePage}
		          </div>
		        </div>	
		        <br>
		        <div align="center">
			        <button id="btncollect" onclick="collectjob(${job.id })" class="btn btn-large btn-primary" >收藏职位</button>   
			        <button id="btnapply" onclick="applyjob(${job.company.id },${job.id })" class="btn btn-large btn-primary" >申请职位</button> 
			        <div id="msg" style="color:red"></div>  	       
		      	</div>
		      </div>      
			</div>
		  </div>
		</div>
		<script type="text/javascript">
			function applyjob(value1,value2){
				$.ajax({					
					url:'<c:url value="/job/apply"/>',
					type:"post",
					cache:false,
					data:{companyId:value1,jobId:value2},
					dataType:'json',
					success:function(data){
						$('#msg').html(data.msg);
						document.getElementById("btnapply").disabled = true;
					}
				});
			}
			function collectjob(value){
				$.ajax({					
					url:'<c:url value="/job/collect"/>',
					type:"post",
					cache:false,
					data:{jobId:value},
					dataType:'json',
					success:function(data){
						$('#msg').html(data.msg);
						document.getElementById("btncollect").disabled = true;
					}
				});
			}
		</script>
		
	<div class="side">
      <div class="box-primary box-golden-card unvip" >	
        <div class="right-post-top">
          <h3>职位发布企业</h3>
          <a href="" target="_blank"><img src=""></a>
          <p class="post-top-p">${job.company.fullName }</p>
          <div class="content content-word">
            <span>行业：</span>
                  <a href="" target="_blank">${job.industry }</a>
              <br>
            <span>规模：</span>${job.company.members}人<br>
            <span>性质：</span>${job.company.nature }<br>
            
            <span>地址：</span>${job.company.address }
            
          </div>
        </div>
		 <!-- 地图 -->       
        <div class="right-post-map">
          <div class="smallmap" style="display: block;">
          </div>
        </div>		
		         
      </div>
    </div>
		
</div>

<jsp:include page="../common/footer.jsp"></jsp:include>

<div class="fixed-aside">
	<a class="fixed-go-top" href="javascript:;">
		<i class="icon-32 icon-32-gotop"></i>
		<span class="text-go-top">返回<br>顶部</span>
	</a>
</div>
</body>
</html>